<?php

class ActiveRecordLog extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return CActiveRecord the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'ActiveRecordLog';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		return array(
			array('description','length','max'=>255),
			array('action','length','max'=>20),
			array('model','length','max'=>45),
			array('field','length','max'=>45),
			array('userid','length','max'=>45),
			array('creationdate', 'required'),
			array('idModel', 'numerical', 'integerOnly'=>true),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id'=>'Id',
			'description'=>'Description',
			'action'=>'Action',
			'model'=>'Model',
			'idModel'=>'Id Model',
			'field'=>'Field',
			'creationdate'=>'Creationdate',
			'userid'=>'User',
		);
	}
}